package org.liuwei.concucrent.base01.interrupt;

import java.util.Date;
/**
 * 
* @Title: ThreadRunnable.java 
* @Package org.liuwei.concucrent.forkjoin.interrupt 
* @Description: TODO(用一句话描述该文件做什么) 
* @author 刘伟  15818570028@163.com   
* @date 2016年8月14日 下午10:03:25 
* @version V1.0
 */
public class ThreadRunnable implements Runnable {
	
	public void run() {
		int i = 0;
		while (true) {
			if (Thread.currentThread().isInterrupted()) {
				System.out.println("线程被Interruted!");
				break;
			}
			System.out.println(i++);
			Thread.yield();
		}
	}
	
	
}
